import style from '@/assets/components.module.scss';

import {} from '@/components';

export interface ProjectProps {
    children?: string | React.ReactElement | React.ReactElement[];
    list?: {
        title: string;
        count: number;
    }[];
}

function Project({ children, list }: ProjectProps) {
    console.log(time().format('{YYYY} HH:mm:ss'), `trends render`);

    const ls = list ?? [];

    return (
        <>
            {ls.map((item) => (
                <div key={Math.random()} className={style['q-item']}>
                    <div className={style['q']}>{item.title}</div>
                    <div>
                        <span>{item.count}</span>
                        <span>回答</span>
                    </div>
                </div>
            ))}
        </>
    );
}

export default Project;
